package com.kehutong.payment.util;

/**
 * 支付常量配置
 * <p>
 * 微信:
 * <a href="https://pay.weixin.qq.com/wiki/doc/api/index.html">开发文档</a>
 * <a href="https://pay.weixin.qq.com/wiki/doc/api/jsapi.php?chapter=9_1">JSAPI</a>
 */
public interface PayConstants {

    /** 支付系统配置 */
    final class Sys {
        /** 保存支付类型的配置参数KEY */
        public static final String DEFAULT_CFG_KEY = "default_key_";
        /** 商户号 */
        public static final String DEFAULT_MCH_ID = "mch_id";
        /** 签名 */
        public static final String FIELD_SIGN = "sign";
        /** 签名类型 */
        public static final String FIELD_SIGN_TYPE = "sign_type";
        /** 加密算法RSA */
        public static final String KEY_ALGORITHM = "RSA";
        /** 签名方式 */
        public static final String SHA_RSA = "SHA256WithRSA";
        /** RSA最大加密明文大小 */
        public static final int MAX_ENCRYPT_BLOCK = 117;
        /** RSA最大解密密文大小 */
        public static final int MAX_DECRYPT_BLOCK = 128;
    }

    /** 支付包装接口服务类型 */
    final class ServiceType {
        /** 统一下单 */
        public static final String UNIFIED_ORDER = "unified.order";
        /** 查询订单 */
        public static final String UNIFIED_QUERY = "unified.query";
        /** 关闭订单 */
        public static final String UNIFIED_CLOSE = "unified.close";
        /** 申请退款 */
        public static final String UNIFIED_REFUND = "unified.refund";
        /** 查询退款 */
        public static final String UNIFIED_REFUND_QUERY = "unified.refund.query";
        /** 下载交易账单 */
        public static final String UNIFIED_DOWNLOAD_BILL = "unified.download.bill";
        /** 请求单次分账 */
        public static final String PROFIT_SHARING = "profit.sharing";
        /** 请求多次分账 */
        public static final String MULTI_PROFIT_SHARING = "multi.profit.sharing";
        /** 添加分账接收方 */
        public static final String PROFIT_SHARING_ADD_RECEIVER = "profit.sharing.add.receiver";
        /** 删除分账接收方 */
        public static final String PROFIT_SHARING_DEL_RECEIVER = "profit.sharing.del.receiver";
        /** 完结分账 */
        public static final String PROFIT_SHARING_FINISH = "profit.sharing.finish";
        /** 查询订单待分账金额 */
        public static final String PRE_PROFIT_SHARING_QUERY = "pre.profit.sharing.query";
        /** 分账回退 */
        public static final String PROFIT_SHARING_RETURN = "profit.sharing.return";
        /** 分账回退结果查询 */
        public static final String PROFIT_SHARING_RETURN_QUERY = "profit.sharing.return.query";
        /** 代扣申请扣款 */
        public static final String CONTRACT_ORDER = "contract.order";
    }
}
